// The Vue build version to load with the `import` command
// (runtime-only or standalone) has been set in webpack.base.conf with an alias.
import Vue from 'vue'
import VueJsonp from 'vue-jsonp'
import App from './App'
import router from './router'
import store from './store'
import wx from 'weixin-js-sdk'
import  'jquery'


// import Vconsole from 'vconsole';
// new Vconsole();

;(function(w){//兼容ios sort 排序
    if(/msie|applewebkit.+safari/i.test(w.navigator.userAgent)){
        var _sort = Array.prototype.sort;
        Array.prototype.sort = function(fn){
            if(!!fn && typeof fn === 'function'){
                if(this.length < 2) return this;
                var i = 0, j = i + 1, l = this.length, tmp, r = false, t = 0;
                for(; i < l; i++){
                    for(j = i + 1; j < l; j++){
                        t = fn.call(this, this[i], this[j]);
                        r = (typeof t === 'number' ? t : !!t ? 1 : 0) > 0 ? true : false;
                        if(r){
                            tmp = this[i];
                            this[i] = this[j];
                            this[j] = tmp;
                        }
                    }
                }
                return this;
            } else {
                return _sort.call(this);
            }
        };
    }
})(window);



Vue.use(wx)
Vue.use(VueJsonp)



import httpRequest from './utils/httpRequest' // api: https://github.com/axios/axios

// import Vant from 'vant';
// Vue.use(Vant);
import '@/components/vant/index.js'
import 'vant/lib/index.css';
import 'lib-flexible/flexible'


Vue.config.productionTip = false


Vue.prototype.$http = httpRequest // ajax
Vue.prototype.$bus = new Vue() 

/* eslint-disable no-new */
new Vue({
    el: '#app',
    router,
    store,
    components: {
        App
    },
    template: '<App/>'
})